var app = getApp();
Page({
  data: {
    
  },
  onLoad(){
    this.getc();
  },
  onShow() {
    
  },
  getc(){
    let user_id = wx.getStorageSync('userdata').user_id || "";
    app.request('book/bargain/bargain_list','POST',{user_id:user_id},'getcb',this)
  },
  getcb(data){
    for (let i = 0; i < data.data.length;i++){
      data.data[i].floor_price = parseInt(data.data[i].floor_price)|| 0;
    }
    this.setData({list:data.data})
  },
  detail(e) {
    let bargain_id = e.currentTarget.id;
    wx.navigateTo({ url: '/pages/kanjia/detail/detail?bargain_id=' + bargain_id +'&from=list'})
  }
})